import { TweenPlugin } from "./TweenPlugin";
import { TweenLite } from "../TweenLite";
//class AutoAlphaPlugin
    
    export  class AutoAlphaPlugin extends TweenPlugin
    {
        constructor()
        {
            
            super();this.propName = "autoAlpha";
            this.overwriteProps = ["alpha", "visible"];
            return;
        }

        public /* override */ onInitTween(arg1: Object, arg2, arg3: TweenLite): Boolean
        {
            this._target = arg1;
            addTween(arg1, "alpha", arg1.alpha, arg2, "alpha");
            return true;
        }

        public /* override */ killProps(arg1: Object): void
        {
            super.killProps(arg1);
            this._ignoreVisible = Boolean("visible" in arg1);
            return;
        }

        public /* override */ set changeFactor(arg1: number)
        {
            updateTweens(arg1);
            if (!this._ignoreVisible) 
            {
                this._target.visible = Boolean(!(this._target.alpha == 0));
            }
            return;
        }

        public static /* const */API: number=1;

        protected /* var */_target: Object;

        protected /* var */_ignoreVisible: Boolean;
    }
